<?php
/**
+++----other
*/
class OtherViewModel extends ViewModel{
	
	public $viewFields = array(
		'other'=>array('*','_as'=>'p'),
		'city' =>array('name'=>'cname','_as'=>'c','_on'=>'p.cityCode=c.code','_type'=>'LEFT'),
		'area' =>array('name'=>'aname','_as'=>'a','_on'=>'p.areaCode=a.code','_type'=>'LEFT'),
	);
	//獲取所有信息
   public function getAll($where,$limit,$order){
		return $this->where($where)->limit($limit)->order($order)->select();
		// echo $this->getLastSql();die;
	}
  //獲取一條信息
   public function getOne($where){
		return $this->where($where)->find();
	}
		
} 

?>